package bavaria.hightech.booking;

import java.util.Comparator;

public enum Sortmethod {
	
		DATE(DateComperator.class),
		VALUE(ValueComperator.class),
		REFERENCE(ReferenceComperator.class);
		
		public Comparator<Booking> comperator;
		
		Sortmethod(Class comperator) {
			try {
				this.comperator = (Comparator) comperator.newInstance();
			} catch (InstantiationException e) {
			
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				
				e.printStackTrace();
			}
		}
		
		
}
